import {
  Column,
  Entity,
  PrimaryGeneratedColumn,
  BeforeInsert,
  CreateDateColumn,
  Generated,
  OneToOne,
  JoinColumn,
  ManyToOne,
} from 'typeorm';
import { User1 } from '../../user1/entities/user1.entity';
@Entity()
export class Tags {
  @PrimaryGeneratedColumn()
  id: number;

  @Column()
  tags: string;
  // 对于tag来说他们是多个tag指定单个用户 所以是  ManyToOne
  @ManyToOne(() => User1, (user) => user.tags)
  @JoinColumn()
  user: User1;
}
